<template>
    <!-- 父组件 -->
    <div>歌谣有车:{{geyao.car}}书:{{geyao.book}}</div>
    <div>孩子传给歌谣:{{geyaochild?.toy}}和书{{geyaochild?.book}}</div>

    <div>
        ------------------
    </div>
     <!-- 子组件 -->
    <childToFather :geyao="geyao" @give="receive"></childToFather>
</template>
<script setup>
import { ref } from 'vue';
    import childToFather from './views/childToFather.vue';
    
    let geyao=ref({
        car:"奔驰",
        book:"vue.js"
    })
    let geyaochild=ref()
    const receive=(data)=>{
        geyaochild.value=data
    }

</script>
